package com.zl.tby.screen.controller;

import com.zl.tby.core.base.bean.TbyPageResult;
import com.zl.tby.core.common.R;
import com.zl.tby.dto.TbyWildCameraAttachQuery;
import com.zl.tby.model.TbySmartBoxHistory;
import com.zl.tby.model.TbyWildCameraAttach;
import com.zl.tby.service.ITbyWildCameraAttachContentService;
import com.zl.tby.service.ITbyWildCameraAttachService;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.core.handle.MethodType;
import org.noear.solon.validation.annotation.Valid;

import java.util.List;

/**
 * 野保相机大屏接口
 * @author changpeng
 * @since 2025/10/15 9:08
 */
@Valid
@Controller
@Mapping("/wild_camera_screen")
public class TbyWildCameraScreenController {

    @Inject
    private ITbyWildCameraAttachService tbyWildCameraAttachService;
    @Inject
    private ITbyWildCameraAttachContentService tbyWildCameraAttachContentService;

    /**
     * 历史数据曲线
     * @param query: 查询条件
     * @return 结果
     */
    @Mapping(value = "/attach_page", method = MethodType.GET)
    public R<TbyPageResult<TbyWildCameraAttach>> attachPage(TbyWildCameraAttachQuery query) {
        return R.ok(tbyWildCameraAttachService.page(query));
    }
}
